﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using myWindowsMediaPlayer.Model;

namespace myWindowsMediaPlayer.ViewModel
{
    class movieViewModel : viewModelBase, interfaceMediaViewModel
    {
       private readonly movieModel movie;

        public movieViewModel(movieModel movie)
        {
            if (movie != null)
                this.movie = movie;
        }

        public movieModel Movie
        {
            get { return this.movie; }
        }

        public string Path
        {
            get { return this.movie.Path; }
            set 
            {
                this.movie.Path = value;
                OnPropertyChanged("moviePath");
            }
        }

        public TimeSpan Duration
        {
            get { return this.movie.Duration; }
            set
            {
                this.Duration = value;
                OnPropertyChanged("movieDuration");
            }
        }

        public int Notation
        {
            get { return this.movie.Notation; }
            set
            {
                this.movie.Notation = value;
                OnPropertyChanged("movieNotation");
            }
        }

        public int Years
        {
            get { return this.movie.Years; }
            set
            {
                this.movie.Years = value;
                OnPropertyChanged("movieYear");
            }
        }

        public string Name
        {
            get { return this.movie.Name; }
            set
            {
                this.movie.Name = value;
                OnPropertyChanged("movieName");
            }
        }

        public movieStyle Kind
        {
            get { return this.movie.Kind; }
            set
            {
                this.movie.Kind = value;
                OnPropertyChanged("movieKind");
            }
        }

        private int id
        {
            get { return this.movie.Id; }
            set
            {
                this.movie.Id = value;
                OnPropertyChanged("movieId");
            }
        }
    }
}
